﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="SBACN.WebSite.Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<script type="text/javascript" src="/js/md5.js"></script>
<script type="text/javascript">
	function ValidInput() {
		var userName = $jqy.trim(document.getElementById("<%= txt_UserName.ClientID%>").value);
		var password = $jqy.trim(document.getElementById("txt_Password").value);
		if (userName.length == 0) {
			//alert("请输入用户名!");
			document.getElementById("<%= lbl_Msg.ClientID%>").innerHTML = "请输入用户名!";
			return false;
		}
		if (password.length == 0) {
			document.getElementById("<%= lbl_Msg.ClientID%>").innerHTML = "请输入密码!";
			//alert("请输入密码!");
			return false;
		}

		document.getElementById("<%= hid_Password.ClientID%>").value = hex_md5(password);
		$jqy("#txt_Password").attr("disabled", "true");
		return true;
	}

	function DoLogin(e) {
		e = window.event || e;
		var key = e.keyCode || e.which;
		if (key == 13) {
			document.getElementById("<%= btn_Login.ClientID%>").click();
		}
	}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<!--主内容区-->
	<div id="wrapper">
		<div id="nav">
			当前位置：<a href="/Index.aspx">首页</a> > 用户登录</div>
		<div id="mainlogin" style="vertical-align: middle;">
			<div id="mainlogin_title">
				<img src="images/mainlogintitle.png" width="199" height="89" alt="" /></div>
			<div id="mainzone">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="10">
					<tr>
						<td width="28%" align="right" class="mainlogin_font">
							用户名：
						</td>
						<td width="72%">
							<asp:TextBox ID="txt_UserName" runat="server" CssClass="input_main" MaxLength="50" TabIndex="1"></asp:TextBox>
						</td>
					</tr>
					<tr>
						<td align="right" class="mainlogin_font">
							密&nbsp;&nbsp;&nbsp;&nbsp;码：
						</td>
						<td>
							<input onkeyup="return DoLogin()" type="password" id="txt_Password" class="input_main"
								maxlength="50" tabindex="2" />
							<asp:HiddenField ID="hid_Password" runat="server" />
						</td>
					</tr>
					<tr>
						<td colspan="2" align="center" style="height:24px;">
							<asp:Label ID="lbl_Msg" runat="server" ForeColor="Red"></asp:Label>&nbsp;
						</td>
					</tr>
					<tr>
						<td align="center">
							&nbsp;
						</td>
						<td align="center">
							<table width="100%" border="0" cellspacing="2" cellpadding="0">
								<tr>
									<td width="37%" align="center">
										<asp:Button ID="btn_Login" runat="server" Text="登 录" CssClass="btnmainlogin" OnClientClick="return ValidInput();" OnClick="btn_Login_Click" TabIndex="3" />
									</td>
									<td width="63%" align="left">
										<a href="/Forgetpwd.aspx" class="login">忘记密码</a>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<div style="clear: both;">
	</div>
	<!--主内容区-->
</asp:Content>
